<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>批量调班</title>
    <link rel="stylesheet" type="text/css" href="${s.base}/lib/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" href="${s.base}/css/base/index.css"/>
    <link rel="stylesheet" type="text/css" href="${s.base}/css/base/theme/theme.css"/>
    <style>
        .w440 {
            width: 440px !important;
        }
    </style>
</head>
<body>
<div class="page-content-wrap clearfix">
    <form class="layui-form" id="tool">
        <div class="layui-tab">
            <div class="layui-tab-content">
                <table cellpadding="0" cellspacing="0" class="wxyy-item-table marb20" width="100%">
                    <tr>
                        <td>调班学生：</td>
                        <td colspan="3">
                            <input type="text" name="name" id="name" value="${name}"
                                               lay-verify="required" placeholder="请输入标题" autocomplete="off"
                                               class="layui-input wxyy-tab-input"
                                               maxlength="30"></td>
                    </tr>
                    <tr>
                        <td>调入班级：</td>
                        <td><select name="class" id="class" lay-verify="required">
                            <option value="">请选择</option>
                            <#list classList as class>
                                <option value="${class.id}">${class.name}</option>
                            </#list>
                        </select></td>
                    </tr>
                </table>
                <div class="layui-form-item">
                    <div class="layui-input-block" style="margin-left: 0px !important;text-align: center">
                        <button class="layui-btn layui-btn-normal" lay-submit lay-filter="submitBtn">保存</button>
                        <button type="button" id="cancel" class="layui-btn layui-btn-primary">取消</button>
                        <button type="button" style="display: none;" id="save"
                                class="layui-btn layui-btn-primary"></button>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
<script src="${s.base}/lib/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="${s.base}/js/common.js" type="text/javascript" charset="utf-8"></script>
<script>
    var menuId = '${parentMenuId}';
    var applyId = '${applyId}';
    var stuId='${stuId}';
    layui.use(['jquery', 'form', 'baseutil', 'page', 'layedit', 'laydate', 'dialog'], function () {
        var $ = layui.jquery,
            form = layui.form,
            layedit = layui.layedit,
            laydate = layui.laydate,
            dialog = layui.dialog,
            page = layui.page,
            baseutil = layui.baseutil;
        var ruleId = "";
        //监听提交
        form.on('submit(submitBtn)', function (data) {
            data.field.stuId=stuId;
            data.field.id=$("#class").val();
            baseutil.post("/divideclass/divideclassclass/changeClass", data.field, function () {
                $("#save").click();
            });
            return false;
        });
    });
</script>
</body>
</html>